package com.surpermaket.service.impl;

import com.surpermaket.entity.User;
import com.surpermaket.mapper.UserMapper;
import com.surpermaket.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public User login(String username, String password) {
        return userMapper.login(username, password);
    }

    @Override
    public int regist(String username, String password) {
        return userMapper.regist(username, password);
    }

    @Override
    public List<User> selectAll(User user) {
        return userMapper.selectAll(user);
    }

    @Override
    public int insert(User user){
        return userMapper.insert(user);
    }

}
